/* 
  1. 并查集()
  > 不相交集合数据结构,用于处理一些不相交集合的合并及查询问题

*/

class A {
  constructor() {
    this.a = 1;
  }
  getA = () => {
    return this.a;
  };
}

let a = new A()
console.log(a.getA());

var minPathSum = function (grid) {
  const r = grid.length
  const c = grid[0].length
  const dp = new Array(r).fill(0).map(item => item=[])
  console.log(dp);

  dp[1].push(1)
  console.log(dp);
};

console.log(minPathSum([[1,2],[2,3]]));